<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<jsp:directive.page import="org.springframework.web.context.support.ServletContextResource" />
<jsp:directive.page import="org.springframework.core.io.Resource" />
<jsp:directive.page import="org.springframework.web.util.WebUtils" />


<%
    //注意文件资源地址以相对于web应用根路径的方式表示
    Resource res3 = new ServletContextResource(application,"WEB-INF/classes/conf/file1.txt");
    out.print(res3.getFilename()+"<br/>");
    out.print(WebUtils.getTempDir(application).getAbsolutePath());
%>
